﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.Text;
using System.Text.RegularExpressions;
using flightquiz.Common;

namespace flightquiz.Data
{
    [Serializable]
    public class Question : IRender
    {
        public int ID { get; set; }
        public string Title { get; set; }
        public Answers Answers { get; set; }

        public Question() { Answers = new Answers(); }

        public override string ToString()
        {
            return ID + "、" + Title;
        }

        public string ToHTML()
        {
            string html = "<p><div>" + ID + "、" + Title + "<div>";

            foreach (var answer in Answers)
            {
                html += answer.ToString();
                html += "<br/>";
            }

            html += "</p>";

            return html;
        }
    }
}
